package cn.zebra.dev.product.module.product.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品表
 *
 * @author runnable
 * @date 2019-09-05 14:35:42
 */
@TableName("product")
@Getter
@Setter
public class ProductEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "商品类型")
    private Integer productType;

    @ApiModelProperty("商品名称")
    private String productName;

    @ApiModelProperty("商品短名称")
    private String shortName;

    @ApiModelProperty("商品编号")
    private String productSn;

    @ApiModelProperty("商品图片地址")
    private String productImage;

    @ApiModelProperty("商品视频地址")
    private String productVideo;

    @ApiModelProperty("商品详情(富文本)")
    private String productDetails;

    @ApiModelProperty("详情图片路径")
    private String detailImg;

    @ApiModelProperty("店铺id")
    private Long shopId;

    @ApiModelProperty("商品总库存")
    private Long totalNum;

    @ApiModelProperty("商品已售数量")
    private Long sellNum;

    @ApiModelProperty("是否上架")
    private Boolean saleFlag;

    @ApiModelProperty("商品上架时间")
    private LocalDateTime saleTime;

    @ApiModelProperty("单位名称")
    private String unitName;

    @ApiModelProperty("单价")
    private BigDecimal unitPrice;

    @ApiModelProperty("商品审核说明")
    private String statusRemark;

    @ApiModelProperty("商品状态-1:禁售 0:未审核 1:已审核")
    private Integer status;

    @ApiModelProperty("是否显示")
    private Boolean showFlag;

    @ApiModelProperty(value = "是否删除", hidden = true)
    private Boolean deleteFlag;

    @ApiModelProperty(value = "创建人", hidden = true)
    private Long createId;

    @ApiModelProperty(value = "创建时间", hidden = true)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人", hidden = true)
    private Long updateId;

    @ApiModelProperty(value = "更新时间", hidden = true)
    private LocalDateTime updateTime;

    @ApiModelProperty("购买消耗积分")
    private Long point;

    @ApiModelProperty("购物完成赠送积分")
    private Long returnPoint;

    @ApiModelProperty("购买增加经验值")
    private Long levelExp;

    @ApiModelProperty("运费")
    private BigDecimal cost;
}
